import { CHANGE_INPUT_VALUE, ADD_ITEM_LIST, DELATE_ITEM_LIST, GET_INIT_LIST, GET_LIST_DATA} from "./actionTypes";


export const getChangeInputAction = (inputValue) => ({
    type: CHANGE_INPUT_VALUE,
    inputValue
})

export const getAddItemAction = (list) => ({
    type: ADD_ITEM_LIST,
    list
})

export const getDelateItemAction = (index) => ({
    type: DELATE_ITEM_LIST,
    index
})

export const getInitListAction = (list) => ({
    type: GET_INIT_LIST,
    list
})

export const getListDataAction = () => ({
    type: GET_LIST_DATA
})

// export const getListDataAction = () => (
//     (dispatch)=>{
//     axios.get('list.json').then((res)=>{
//         const action = getInitListAction (res.data)
//         dispatch(action)
//     })
// })



